feat(universal-router-sdk): export encodeSwapStep from the package root - #653
Open
claude[bot] wants to merge 1 commit into
Open
feat(universal-router-sdk): export encodeSwapStep from the package root#653claude[bot] wants to merge 1 commit into
claude[bot] wants to merge 1 commit into
Conversation
Consumers composing per-step {commands, inputs} plans (e.g. Uniswap/backend#10604's
BalanceSwapProxy plan builder) previously had to vendor the function; it existed in
the build but was not re-exported. Adds a root re-export with a doc comment, an
export-surface unit test, and a minor changeset.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019fVKXDjny28BtvNdeHLSZY
Contributor
|
● Reviewed · against Note Approved. Re-exports the existing Tip Teach the reviewer. React 👍 on findings that helped, 👎 on false positives. Reply to push back or add context — we aggregate this weekly to tune the bot. Comment |
Contributor
There was a problem hiding this comment.
Note
✅ Approved — see full review in the sticky comment ↑
Graphite Automations"Request reviewers once CI passes on sdks monorepo" took an action on this PR • (07/19/26)3 reviewers were added to this PR based on Siyu Jiang (See-You John)'s automation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Mark Toda · Slack thread
Description
Before:
encodeSwapStep(per-stepSwapStep → RoutePlannercommand encoding) exists in the build (utils/encodeSwapStep) but is not re-exported, andpackage.jsonexportsmaps only"."— so consumers that need per-step{commands, inputs}without theSwapRouter.encodeSwapsenvelope (Permit2 ingress + fee + final SWEEP) must vendor a copy of the function.After:
encodeSwapStepis re-exported from the package root with a doc comment noting it writes into a caller-ownedRoutePlannerand applies no ingress/settlement. No new code or semantics — a one-line export.Consumer: Uniswap/backend#10604 (BalanceSwapProxy quotes) builds a raw
{commands, inputs}Universal Router plan from router-providedSwapStep[]and currently carries a vendored copy of this function pending this export.Changeset:
minorbump for@uniswap/universal-router-sdk.How Has This Been Tested?
test/unit/exports.test.ts): root re-export identity + a standalone one-step encode sanity check.turbo run build --filter=@uniswap/universal-router-sdkclean; hardhat unit suite 370 passing (the pre-existinguniswapTradesmainnet-fork suite requiresFORK_URLand is unavailable in this environment).Are there any breaking changes?
No — additive export only.
🤖 Generated with Claude Code
https://claude.ai/code/session_019fVKXDjny28BtvNdeHLSZY
Generated by Claude Code